var app = angular.module('App', ['ui.router']);
app.controller('indexCtrl', ['$scope', function ($scope) {

	$scope.navBtns = [
		{name: '首页', sref: 'zhuye', is_open: 1}
		,{name: '闪送超市', sref: 'sscs', is_open: 1}
		,{name: '购物车', sref: 'gouwuche', is_open: 1}
		,{name: '我的', sref: 'wode', is_open: 1}
	];


	$scope.tabbardj = function ( btns, index) {

		for (var i = 0; i < btns.length; i++) {
			if (i==index ) {
				btns[i].is_open = 0;
			}else{
				btns[i].is_open = 1;
			}
		}
	}
}]);
